Skip to content

Fix "cache: token not found" for auth token command#3447

Merged
pietern merged 3 commits into
mainfrom
sdk-no-token-error
Aug 20, 2025
Merged

Fix "cache: token not found" for auth token command#3447
pietern merged 3 commits into
mainfrom
sdk-no-token-error

Conversation

@pietern

@pietern pietern commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

Changes

Update the "auth token" command to return the same error as CLI v0.263.0.

Why

Older versions of Databricks SDKs call this command to retrieve an OAuth token. They perform a substring match on the returned error to determine if the CLI experienced a real error or if OAuth is not an applicable authentication mechanism in the user's context. By changing the error message (see databricks/databricks-sdk-go#1250), these older SDKs no longer fall through but return an error cache: no token found when checking if they can use OAuth to authenticate.

Tests

Adds an acceptance test. It passes with the previous version of the CLI and passes with this commit.

@pietern pietern temporarily deployed to test-trigger-is August 20, 2025 13:04 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 20, 2025

Copy link
Copy Markdown
Collaborator

Run: 17099268397

Env ✅‌pass 🔄‌flaky 🙈‌skip
✅‌ aws linux 310 483
✅‌ aws windows 311 482
🔄‌ aws-ucws linux 414 10 381
🔄‌ aws-ucws windows 415 10 380
✅‌ azure linux 310 482
✅‌ azure windows 311 481
✅‌ azure-ucws linux 426 378
✅‌ azure-ucws windows 427 377
✅‌ gcp linux 309 484
✅‌ gcp windows 310 483
10 failing tests:
Test Name aws-ucws linux aws-ucws windows
TestAccept/bundle/deploy/dashboard/detect-change 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deploy/dashboard/generate_inplace 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deploy/dashboard/nested-folders 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deploy/dashboard/simple_syncroot 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deployment/bind/dashboard 🔄‌flaky 🔄‌flaky
TestAccept/bundle/deployment/bind/dashboard/recreation 🔄‌flaky 🔄‌flaky
TestDashboardAssumptions_WorkspaceImport 🔄‌flaky 🔄‌flaky
TestFetchRepositoryInfoAPI_FromRepo 🔄‌flaky 🔄‌flaky

@pietern pietern enabled auto-merge August 20, 2025 13:18
@pietern pietern added this pull request to the merge queue Aug 20, 2025
Merged via the queue into main with commit e712e7d Aug 20, 2025
13 checks passed
@pietern pietern deleted the sdk-no-token-error branch August 20, 2025 13:48
deco-sdk-tagging Bot added a commit that referenced this pull request Aug 21, 2025
## Release v0.265.0

### CLI
* Fix "cache: token not found" for auth token command ([#3447](#3447))

### Dependency updates
* Upgrade TF provider to 1.87.0 ([#3430](#3430))
* Upgrade Go SDK to 0.81.0 ([#3449](#3449))

### Bundles
* Add support for Lakebase database instances in DABs ([#3283](#3283))
* Add support for Lakebase database catalogs in DABs ([#3436](#3436))
* Improve error message for SDK/API errors ([#3379](#3379))
* Separate generated classes between jobs and pipelines in Python support ([#3428](#3428))
denik pushed a commit that referenced this pull request May 20, 2026
## Changes

Update the "auth token" command to return the same error as CLI
v0.263.0.

## Why

Older versions of Databricks SDKs call this command to retrieve an OAuth
token. They perform a substring match on the returned error to determine
if the CLI experienced a real error or if OAuth is not an applicable
authentication mechanism in the user's context. By changing the error
message (see databricks/databricks-sdk-go#1250), these older SDKs no
longer fall through but return an error `cache: no token found` when
checking if they can use OAuth to authenticate.

## Tests

Adds an acceptance test. It passes with the previous version of the CLI
and passes with this commit.
denik pushed a commit that referenced this pull request May 20, 2026
## Release v0.265.0

### CLI
* Fix "cache: token not found" for auth token command ([#3447](#3447))

### Dependency updates
* Upgrade TF provider to 1.87.0 ([#3430](#3430))
* Upgrade Go SDK to 0.81.0 ([#3449](#3449))

### Bundles
* Add support for Lakebase database instances in DABs ([#3283](#3283))
* Add support for Lakebase database catalogs in DABs ([#3436](#3436))
* Improve error message for SDK/API errors ([#3379](#3379))
* Separate generated classes between jobs and pipelines in Python support ([#3428](#3428))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest CLI v0.264.2 Error: cache: token not found when running CLI from Terraform plan

4 participants